<!DOCTYPE html>
<html lang="en-us">
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Hugo 0.57.2" />


<title>New Blog  - Terence Lau | Stat Undergra</title>
<meta property="og:title" content="New Blog  - Terence Lau | Stat Undergra">


  <link href='/favicon.ico' rel='icon' type='image/x-icon'/>



  








<link href='//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css' rel='stylesheet' type='text/css' />



<link rel="stylesheet" href="/css/fonts.css" media="all">
<link rel="stylesheet" href="/css/main.css" media="all">



  </head>
  <body>
    <div class="wrapper">
      <header class="header">
        <nav class="nav">
  <a href="/" class="nav-logo">
    <img src="/images/logo.jpg"
         width="50"
         height="50"
         alt="Logo">
  </a>

  <ul class="nav-links">
    
    <li><a href="/about/">About</a></li>
    
    <li><a href="https://github.com/TerenceLiu98">GitHub</a></li>
    
    <li><a href="https://terenceliu98.github.io/terenceliu98.github.io2/">Old Version</a></li>
    
    <li><a href="https://terenceliu98.github.io/tags/">Tags</a></li>
    
    <li><a href="https://twitter.com/terencelau_st">Twitter</a></li>
    
    <li><a href="https://www.zhihu.com/people/liu-jun-jie-53/">Zhihu/知乎</a></li>
    
  </ul>
</nav>

      </header>


<main class="content" role="main">

  <article class="article">
    
    <span class="article-duration">2 min read</span>
    

    <h1 class="article-title">New Blog </h1>

    
    <span class="article-date">2019-08-18</span>
    

    <div class="article-content">
      


<div id="what-is-this" class="section level2">
<h2>What is this?</h2>
<p>This is my new blog. I am tired of using HTML and writing the CSS. I am now using Hugo and Github Pages.</p>
</div>
<div id="what-is-the-difference" class="section level2">
<h2>What is the difference</h2>
<p>This is a different experience than the normal Hugo + Github Pages, since this is also powered by RMarkdown, which means I can writing blog in Rstudio and also Rmarkdown is friendly to our statistics student because of the <code>R</code>. For instance:</p>
<pre class="r"><code>library(ggplot2)
ggplot(diamonds, aes(x = carat, y = price, colour = clarity)) +
  geom_point() +
  xlab(&quot;Carats&quot;) + ylab(&quot;Price&quot;) + 
  ggtitle(&quot;Diamonds&quot;)</code></pre>
<p><img src="/post/2019-08-18-new-blog_files/figure-html/unnamed-chunk-1-1.png" width="672" /></p>
<p>I can easily draw a plot by using Rmd. In the above plot, I draw it by using the famous library: <code>ggplot</code>; what’s more, it can eaisly for us to add plug-in in our post, like, twitter, youtube and etc.:</p>
<pre class="r"><code>blogdown::shortcode(&quot;youtube&quot;, &quot;CjTLN-FXiFA&quot;)</code></pre>
<p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
  <iframe src="//www.youtube.com/embed/CjTLN-FXiFA" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe>
</div>

It is a ‘sharp knife’ for our “bvlogger”, I means blogger + vlogger actually.</p>
<p>Also, since it combined with hugo, I can easily push my post on GitHub and use the GitHub Pages service, which means I can save some server money.</p>
</div>
<div id="where-is-the-old-article" class="section level2">
<h2>Where is the old article</h2>
<p>Here is the URL to the old web <a href="https://terenceliu98.github.io/terenceliu98.github.io2/">Old Version Access</a>
<br>
I will try my best to move them under the new structure, but forgive me, there are some articles are written in <code>python</code> + markdown or <code>MATLAB</code> + markdown, for those articles have to stay in the old repo.</p>
</div>

    </div>
  </article>

  
<section id="comments">
  <div id="disqus_thread"></div>
  <script>
  var disqus_config = function () {
  
  };
  (function() {
    var inIFrame = function() {
      var iframe = true;
      try { iframe = window.self !== window.top; } catch (e) {}
      return iframe;
    };
    if (inIFrame()) return;
    var d = document, s = d.createElement('script');
    s.src = '//terenceliu98-github-io-1.disqus.com/embed.js'; s.async = true;
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
  })();
  </script>
  <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</section>



</main>

      <footer class="footer">
        <ul class="footer-links">
          <li>
            <a href="/index.xml" type="application/rss+xml" target="_blank">RSS feed</a>
          </li>
          <p></p>Copyright &copy; Terence Lau 2016-2019</p>
          
        </ul>
      </footer>

    </div>
    



<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>



<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/r.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/yaml.min.js"></script>
<script>hljs.configure({languages: []}); hljs.initHighlightingOnLoad();</script>



    

    
  </body>
</html>

